home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / Include / FWFrming.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  5.5 KB  |  188 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWFrming.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWFRMING_H
  11. #define FWFRMING_H
  12.  
  13. #ifndef FWFRAME_H
  14. #include "FWFrame.h"
  15. #endif
  16.  
  17. // ----- ODF Foundation Includes -----
  18.  
  19. #ifndef FWRUNTYP_H
  20. #include "FWRunTyp.h"
  21. #endif
  22.  
  23. #ifndef FWSTDDEF_H
  24. #include "FWStdDef.h"
  25. #endif
  26.  
  27. //========================================================================================
  28. //    Forward Declarations
  29. //========================================================================================
  30.  
  31. class ODFacet;
  32. class ODShape;
  33. class ODObjectSpec;
  34. class ODDragItemIterator;
  35.  
  36. class FW_CEmbeddingPart;
  37. class FW_MProxy;
  38. class FW_CBorderMouseEvent;
  39. class FW_CEmbeddedMouseEvent;
  40. class FW_CPoint;
  41. class FW_CProxyFrame;
  42. class FW_COpenFileParameters;
  43. class FW_CInsertCommand;
  44. class FW_PFileSpecification;
  45.  
  46. //========================================================================================
  47. //    class FW_CEmbeddingFrame
  48. //========================================================================================
  49.  
  50. class FW_CEmbeddingFrame : public FW_CFrame
  51. {
  52. public:
  53.     FW_DECLARE_CLASS
  54.     FW_DECLARE_AUTO(FW_CEmbeddingFrame)
  55.  
  56. //----------------------------------------------------------------------------------------
  57. //    Initialization/Destruction
  58. //
  59. public:
  60.     FW_CEmbeddingFrame(Environment* ev, 
  61.                         ODFrame* odFrame, 
  62.                         FW_CPresentation* presentation,
  63.                         FW_CEmbeddingPart* part,
  64.                         FW_ResourceId id = 0);
  65.     virtual ~ FW_CEmbeddingFrame();
  66.  
  67. //----------------------------------------------------------------------------------------
  68. //    Inherited API
  69. //
  70. public:
  71.     // ----- Adjust Cursor -----
  72.     virtual FW_Boolean            AdjustCursor(Environment* ev, 
  73.                                     ODFacet* facet, 
  74.                                     const FW_CPoint& theMousePoint);
  75.     // ----- ViewType -----
  76.     virtual void                ViewTypeChanged(Environment* ev, 
  77.                                     ODTypeToken newViewType, 
  78.                                     ODTypeToken oldViewType);
  79.     
  80.     // ----- Highlight -----
  81.     virtual void                HighlightChanged(Environment* ev,
  82.                                     ODFacet* facet);
  83.     // ----- Facets -----
  84.     virtual void                 FacetAdded(Environment* ev, 
  85.                                     ODFacet* facet,
  86.                                     unsigned short facetCount);
  87.     virtual void                 FacetRemoved(Environment* ev, 
  88.                                     ODFacet* facet,
  89.                                     unsigned short facetCount);
  90.  
  91.     // ----- Notification -----    
  92.     virtual void                FrameAdded(Environment* ev, ODFrame* odFrame, FW_Boolean fromStorage);
  93.     virtual void                FrameRemoved(Environment* ev, FW_Boolean toStorage);
  94.  
  95.     // ----- Menu Events -----
  96.     virtual FW_Boolean            HandleAdjustMenus(Environment* ev, 
  97.                                     FW_CMenuBar* menuBar,
  98.                                     FW_Boolean hasMenuFocus, 
  99.                                     FW_Boolean isRoot);
  100.     virtual FW_Boolean            HandleMenu(Environment* ev, 
  101.                                     const FW_CMenuEvent& theMenuEvent);
  102.  
  103.     // ----- Getter -----
  104.     FW_CEmbeddingPart*            GetPart(Environment* ev) const;
  105.                                     
  106. //----------------------------------------------------------------------------------------
  107. //    New API
  108. //
  109. public:
  110.     // ----- Embedded Facets -----
  111.     virtual ODFacet*            CreateEmbeddedFacet(Environment* ev,
  112.                                     ODFacet* embeddingFacet,
  113.                                     FW_MProxy* proxy,
  114.                                     ODFrame* embeddedFrame,
  115.                                     ODShape* proposedClipShape) = 0;
  116.                                     
  117.     virtual void                 EmbeddedFacetAdded(Environment* ev,
  118.                                     ODFacet* facet);
  119.     virtual void                 EmbeddedFacetRemoved(Environment* ev, 
  120.                                     ODFacet* facet);
  121.                                     
  122.     FW_Boolean                    HasASelectedEmbeddedFacet(Environment* ev) const;
  123.  
  124.     // ----- Insert Command -----
  125.     virtual FW_CInsertCommand*    NewInsertCommand(Environment* ev, 
  126.                                     const FW_PFileSpecification& fileSpec);
  127.     virtual void                DoInsert(Environment *ev, 
  128.                                     FW_COpenFileParameters& openFileParameters);
  129.                                     
  130.     // ----- Embedded frames -----
  131.     virtual FW_Boolean             RevealFrame(Environment *ev, 
  132.                                     ODFrame* embeddedFrame, 
  133.                                     ODShape* revealShape);
  134.  
  135.     virtual FW_MProxy*             EmbeddedFrameRequested(Environment *ev,
  136.                                     FW_MProxy* baseProxy,
  137.                                     ODFrame* baseFrame,
  138.                                     ODShape* frameShape,
  139.                                     ODPart* embeddedPart,
  140.                                     ODTypeToken viewType,
  141.                                     ODTypeToken presentation,
  142.                                     ODID frameGroupID,
  143.                                     FW_Boolean isOverlaid,
  144.                                     FW_Boolean isSubFrame);
  145.     
  146.     FW_MProxy*                    GetProxy(Environment *ev, 
  147.                                     ODFrame* embeddedFrame) const;
  148.     
  149.     // ----- Facet Hierarchy -----
  150.     ODFacet*                     GetEmbeddedFacet(Environment* ev, 
  151.                                     ODFacet* facet, 
  152.                                     FW_MProxy* proxy);
  153.         
  154.     // ----- OD to FW conversion -----
  155.     static FW_CEmbeddingFrame*    ODtoFWEmbeddingFrame(Environment* ev, 
  156.                                     ODFrame* odFrame);
  157.  
  158.     // ----- OpenDoc UI -----
  159.     virtual void                ShowPartInfo(Environment* ev);
  160.     void                        OpenSelection(Environment* ev);
  161.  
  162.  
  163. //----------------------------------------------------------------------------------------
  164. //    Public but for Internal use only
  165. //
  166. public:
  167.     ODFrame*                    PrivCreateEmbeddedFrame(Environment* ev, 
  168.                                             ODType frameType,
  169.                                             ODPart *embeddedODPart,
  170.                                             ODShape* frameShape,
  171.                                             ODCanvas* biasCanvas,                // can be null
  172.                                             ODTypeToken viewType,
  173.                                             ODTypeToken presentation,            // can be null
  174.                                             FW_Boolean isOverlaid,
  175.                                             FW_Boolean subFrame);
  176.  
  177.     virtual void                PrivAttachSourceFrame(Environment* ev, 
  178.                                             FW_CFrame* sourceFrame);
  179.                                     
  180.     void                        PrivRemoveEmbeddedFrame(Environment* ev,
  181.                                             FW_CProxyFrame* proxyFrame);    
  182.  
  183.     virtual void                PrivDragging(Environment *ev, FW_Boolean state);
  184. };
  185.  
  186. #endif
  187.  
  188.